﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<EPPLib.Data.ContactDataObject>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="mainContentPlaceholder" runat="server">
    <h2>Contatti - Crea nuovo</h2>
    <div class="back">
        <%: Html.ActionLink("Torna alla lista", "Index") %>
    </div>
    <% using (Html.BeginForm()) {%>
        <%: Html.ValidationSummary(true) %>

        <fieldset>
            <legend>Fields</legend>
            <div class="floatBox">
                <div class="editor-label">
                    <%: Html.LabelFor(model => model.ID) %>
                </div>
                <div class="editor-field">
                    <%: Html.TextBoxFor(model => model.ID) %>
                    <%: Html.ValidationMessageFor(model => model.ID) %>
                </div>
            </div>
            <div class="floatBox">
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Name) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Name) %>
                <%: Html.ValidationMessageFor(model => model.Name) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Organization) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Organization) %>
                <%: Html.ValidationMessageFor(model => model.Organization) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Street1) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Street1) %>
                <%: Html.ValidationMessageFor(model => model.Street1) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Street2) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Street2) %>
                <%: Html.ValidationMessageFor(model => model.Street2) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Street3) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Street3) %>
                <%: Html.ValidationMessageFor(model => model.Street3) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.City) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.City) %>
                <%: Html.ValidationMessageFor(model => model.City) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.District) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.District) %>
                <%: Html.ValidationMessageFor(model => model.District) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.PostalCode) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.PostalCode) %>
                <%: Html.ValidationMessageFor(model => model.PostalCode) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.CountryCode) %>
            </div>
            <div class="editor-field">
                <%: Html.DropDownListFor(model => model.CountryCode, (SelectList)ViewData["__COUNTRIES"], "-- Seleziona --") %>
                <%: Html.ValidationMessageFor(model => model.CountryCode) %>
            </div>
            </div>

            <div class="floatBox">
            <div class="editor-label">
                <%: Html.LabelFor(model => model.PhonePrefix) %>
            </div>
            <div class="editor-field">
                <%: Html.DropDownListFor(model => model.PhonePrefix, (SelectList)ViewData["__PHONE_PREFIXES"], "-- Seleziona --")%>
                <%: Html.ValidationMessageFor(model => model.PhonePrefix) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Phone) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Phone) %>
                <%: Html.ValidationMessageFor(model => model.Phone) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.PhoneInternal) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.PhoneInternal) %>
                <%: Html.ValidationMessageFor(model => model.PhoneInternal) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.FaxPrefix) %>
            </div>
            <div class="editor-field">
                <%: Html.DropDownListFor(model => model.FaxPrefix, (SelectList)ViewData["__FAX_PREFIXES"], "-- Seleziona --")%>
                <%: Html.ValidationMessageFor(model => model.FaxPrefix) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Fax) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Fax) %>
                <%: Html.ValidationMessageFor(model => model.Fax) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.FaxInternal) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.FaxInternal) %>
                <%: Html.ValidationMessageFor(model => model.FaxInternal) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Email) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Email) %>
                <%: Html.ValidationMessageFor(model => model.Email) %>
            </div>
            </div>

            <div class="floatBox">
            <div class="editor-label">
                <%: Html.LabelFor(model => model.AuthInfo) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.AuthInfo) %>
                <%: Html.ValidationMessageFor(model => model.AuthInfo) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.ConsentForPublishing) %>
            </div>
            <div class="editor-field">
                <%: Html.CheckBoxFor(model => model.ConsentForPublishing)%>
                <%: Html.ValidationMessageFor(model => model.ConsentForPublishing) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.NationalityCode) %>
            </div>
            <div class="editor-field">
                <%: Html.DropDownListFor(model => model.NationalityCode, (SelectList)ViewData["__COUNTRIES"], "-- Seleziona --")%>
                <%: Html.ValidationMessageFor(model => model.NationalityCode) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.EntityType) %>
            </div>
            <div class="editor-field">
                <%: Html.DropDownListFor(model => model.EntityType, (SelectList)ViewData["__ENTITY_TYPES"], "-- Seleziona --")%>
                <%: Html.ValidationMessageFor(model => model.EntityType) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.RegCode) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.RegCode) %>
                <%: Html.ValidationMessageFor(model => model.RegCode) %>
            </div>
            </div>

            <div class="clearer">
            <input type="submit" value="Invia" onclick="return confirm('Confermi?');" />
            </div>
        </fieldset>

    <% } %>
    <% Html.RenderPartial("ConsoleView", (EPPLib.Messages.BaseResponseMessage)ViewData["__RESPONSE_MESSAGE"]); %>
</asp:Content>

<asp:Content ID="titleContent" ContentPlaceHolderID="titleContentPlaceholder" runat="server">
    Contatti - Crea nuovo Registrant
</asp:Content>